﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobjlist of ArticleKeyword; match merged into _list">
	<Sql>
		SELECT        ArticleKeywordMatches.keywordId AS id, COUNT(ArticleKeywordMatches.articleId) AS articleMatchCount
		FROM            ArticleKeywords INNER JOIN
		ArticleKeywordMatches ON ArticleKeywords.id = ArticleKeywordMatches.keywordId
		WHERE        (ArticleKeywords.keywordSetId = @setId)
		GROUP BY ArticleKeywordMatches.keywordId
	</Sql>
	<Param name="setId" type="UniqueIdentifier" />	
</AdoNetDataAccess>